package view;

import javax.swing.BorderFactory;
import javax.swing.DefaultComboBoxModel;
import javax.swing.GroupLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;

public class EmViewPanel extends JPanel {
	private JLabel lblAddress_ViewEm;
	private JLabel lblBirthday_ViewEm;
	private JLabel lblEmail_ViewEm;
	private JLabel lblID_ViewEm;
	private JLabel lblName_ViewEm;
	private JLabel lblPhone_ViewEm;
	private JLabel lblSex_ViewEm;
	private JTextField tfID_ViewEm;
	private JTextField tfName_ViewEm;
	private JTextField tfPhone_ViewEm;
	private JTextField tfEmail_ViewEm;
	private JTextField tfAddress_ViewEm;
	private JButton btnEdit_ViewEm;
	private JButton btnRemove_ViewEm;
	private JButton btnSearch_ViewEm;
	private JButton btnUpdate_ViewEm;
	private JComboBox<String> cbbSex_ViewEm;
	private JComboBox<String> cbbDay_ViewEm;
	private JComboBox<String> cbbMonth_ViewEm;
	private JComboBox<String> cbbYear_ViewEm;
	private JComboBox<String> cbbSearch_ViewEm;
	private JLabel lbtSearchBy_ViewEm;
	private JPanel panelInfor;
	private JPanel panelSearch;
	private JPanel panelList;
	private JScrollPane jScrollPane1;
	private JTable table_ViewEm;
	private JTextField tfSearch_ViewEm;

	private static final long serialVersionUID = 1L;

	public EmViewPanel() {
		initComponents();
	}

	@SuppressWarnings({ "unchecked", "rawtypes" })
	private void initComponents() {

		panelInfor = new JPanel();
		lblPhone_ViewEm = new JLabel();
		lblName_ViewEm = new JLabel();
		lblID_ViewEm = new JLabel();
		lblEmail_ViewEm = new JLabel();
		lblBirthday_ViewEm = new JLabel();
		lblAddress_ViewEm = new JLabel();
		lblSex_ViewEm = new JLabel();
		tfID_ViewEm = new JTextField();
		tfName_ViewEm = new JTextField();
		tfPhone_ViewEm = new JTextField();
		tfEmail_ViewEm = new JTextField();
		tfAddress_ViewEm = new JTextField();
		cbbSex_ViewEm = new JComboBox();
		cbbDay_ViewEm = new JComboBox();
		cbbMonth_ViewEm = new JComboBox();
		cbbYear_ViewEm = new JComboBox();
		panelSearch = new JPanel();
		tfSearch_ViewEm = new JTextField();
		btnSearch_ViewEm = new JButton();
		lbtSearchBy_ViewEm = new JLabel();
		cbbSearch_ViewEm = new JComboBox();
		btnEdit_ViewEm = new JButton();
		btnRemove_ViewEm = new JButton();
		panelList = new JPanel();
		jScrollPane1 = new JScrollPane();
		table_ViewEm = new JTable();
		btnUpdate_ViewEm = new JButton();

		setBackground(new java.awt.Color(255, 255, 255));
		setLayout(null);

		panelInfor.setBackground(new java.awt.Color(255, 255, 255));
		panelInfor.setBorder(BorderFactory.createTitledBorder(null,
				"Information", TitledBorder.DEFAULT_JUSTIFICATION,
				TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 1,
						12)));
		panelInfor.setLayout(null);

		lblPhone_ViewEm.setFont(new java.awt.Font("Calibri", 0, 16));
		lblPhone_ViewEm.setText("Phone:");
		panelInfor.add(lblPhone_ViewEm);
		lblPhone_ViewEm.setBounds(40, 60, 50, 20);

		lblName_ViewEm.setFont(new java.awt.Font("Calibri", 0, 16));
		lblName_ViewEm.setText("Name:");
		panelInfor.add(lblName_ViewEm);
		lblName_ViewEm.setBounds(40, 30, 50, 20);

		lblID_ViewEm.setFont(new java.awt.Font("Calibri", 0, 16));
		lblID_ViewEm.setText("Persional ID:");
		panelInfor.add(lblID_ViewEm);
		lblID_ViewEm.setBounds(350, 60, 90, 30);

		lblEmail_ViewEm.setFont(new java.awt.Font("Calibri", 0, 16));
		lblEmail_ViewEm.setText("Email:");
		panelInfor.add(lblEmail_ViewEm);
		lblEmail_ViewEm.setBounds(40, 90, 50, 30);

		lblBirthday_ViewEm.setFont(new java.awt.Font("Calibri", 0, 16));
		lblBirthday_ViewEm.setText("Birthday:");
		panelInfor.add(lblBirthday_ViewEm);
		lblBirthday_ViewEm.setBounds(40, 120, 60, 30);

		lblAddress_ViewEm.setFont(new java.awt.Font("Calibri", 0, 16));
		lblAddress_ViewEm.setText("Address:");
		panelInfor.add(lblAddress_ViewEm);
		lblAddress_ViewEm.setBounds(350, 30, 60, 30);

		lblSex_ViewEm.setFont(new java.awt.Font("Calibri", 0, 16));
		lblSex_ViewEm.setText("Sex:");
		panelInfor.add(lblSex_ViewEm);
		lblSex_ViewEm.setBounds(350, 90, 50, 30);
		panelInfor.add(tfID_ViewEm);
		tfID_ViewEm.setBounds(440, 60, 170, 20);
		panelInfor.add(tfName_ViewEm);
		tfName_ViewEm.setBounds(120, 30, 170, 20);
		panelInfor.add(tfPhone_ViewEm);
		tfPhone_ViewEm.setBounds(120, 60, 170, 20);
		panelInfor.add(tfEmail_ViewEm);
		tfEmail_ViewEm.setBounds(120, 90, 170, 20);
		panelInfor.add(tfAddress_ViewEm);
		tfAddress_ViewEm.setBounds(440, 30, 170, 20);

		cbbSex_ViewEm.setModel(new DefaultComboBoxModel(new String[] {
				"Item 1", "Item 2", "Item 3", "Item 4" }));
		panelInfor.add(cbbSex_ViewEm);
		cbbSex_ViewEm.setBounds(440, 90, 70, 20);

		cbbDay_ViewEm.setModel(new DefaultComboBoxModel(new String[] {
				"Item 1", "Item 2", "Item 3", "Item 4" }));
		panelInfor.add(cbbDay_ViewEm);
		cbbDay_ViewEm.setBounds(120, 120, 50, 20);

		cbbMonth_ViewEm.setModel(new DefaultComboBoxModel(new String[] {
				"Item 1", "Item 2", "Item 3", "Item 4" }));
		panelInfor.add(cbbMonth_ViewEm);
		cbbMonth_ViewEm.setBounds(180, 120, 50, 20);

		cbbYear_ViewEm.setModel(new DefaultComboBoxModel(new String[] {
				"Item 1", "Item 2", "Item 3", "Item 4" }));
		panelInfor.add(cbbYear_ViewEm);
		cbbYear_ViewEm.setBounds(240, 120, 50, 20);

		add(panelInfor);
		panelInfor.setBounds(10, 10, 680, 160);

		panelSearch.setBackground(new java.awt.Color(255, 255, 255));
		panelSearch.setBorder(BorderFactory.createTitledBorder(null, "Search",
				TitledBorder.DEFAULT_JUSTIFICATION,
				TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 1,
						12)));
		panelSearch.setLayout(null);
		panelSearch.add(tfSearch_ViewEm);
		tfSearch_ViewEm.setBounds(10, 30, 130, 20);

		btnSearch_ViewEm.setIcon(new ImageIcon("icon/search.png"));
		btnSearch_ViewEm.setText("Search");
		btnSearch_ViewEm.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				jButton5ActionPerformed(evt);
			}
		});
		panelSearch.add(btnSearch_ViewEm);
		btnSearch_ViewEm.setBounds(240, 30, 90, 20);

		lbtSearchBy_ViewEm.setText("By");
		panelSearch.add(lbtSearchBy_ViewEm);
		lbtSearchBy_ViewEm.setBounds(150, 30, 20, 20);

		cbbSearch_ViewEm.setModel(new DefaultComboBoxModel(new String[] {
				"Item 1", "Item 2", "Item 3", "Item 4" }));
		panelSearch.add(cbbSearch_ViewEm);
		cbbSearch_ViewEm.setBounds(170, 30, 56, 20);

		add(panelSearch);
		panelSearch.setBounds(10, 180, 340, 80);

		btnEdit_ViewEm.setBackground(new java.awt.Color(255, 255, 255));
		btnEdit_ViewEm.setIcon(new ImageIcon("icon/em_edit.png"));
		btnEdit_ViewEm.setText("Edit");
		add(btnEdit_ViewEm);
		btnEdit_ViewEm.setBounds(370, 210, 90, 30);

		btnRemove_ViewEm.setIcon(new ImageIcon("ico/em_delete.png"));
		btnRemove_ViewEm.setText("Remove");
		add(btnRemove_ViewEm);
		btnRemove_ViewEm.setBounds(570, 210, 100, 30);

		panelList.setBackground(new java.awt.Color(255, 255, 255));
		panelList.setBorder(BorderFactory.createTitledBorder(null,
				"List Employee", TitledBorder.DEFAULT_JUSTIFICATION,
				TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 1,
						12)));

		table_ViewEm.setModel(new DefaultTableModel(new Object[][] {
				{ null, null, null, null, null, null, null, null },
				{ null, null, null, null, null, null, null, null },
				{ null, null, null, null, null, null, null, null },
				{ null, null, null, null, null, null, null, null },
				{ null, null, null, null, null, null, null, null } },
				new String[] { "ID", "Name", "Sex", "Birthday", "Persional ID",
						"Phone", "Email", "Address" }));
		jScrollPane1.setViewportView(table_ViewEm);

		GroupLayout jPanel3Layout = new GroupLayout(panelList);
		panelList.setLayout(jPanel3Layout);
		jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(
				GroupLayout.Alignment.LEADING).addComponent(jScrollPane1,
				GroupLayout.DEFAULT_SIZE, 668, Short.MAX_VALUE));
		jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(
				GroupLayout.Alignment.LEADING).addComponent(jScrollPane1,
				GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 145,
				Short.MAX_VALUE));

		add(panelList);
		panelList.setBounds(10, 270, 680, 170);

		btnUpdate_ViewEm.setBackground(new java.awt.Color(255, 255, 255));
		btnUpdate_ViewEm.setIcon(new ImageIcon("icon/save.png"));
		btnUpdate_ViewEm.setText("Update");
		btnUpdate_ViewEm.setEnabled(false);
		add(btnUpdate_ViewEm);
		btnUpdate_ViewEm.setBounds(470, 210, 90, 30);
	}

	private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton5ActionPerformed
	}

}
